import request from '@/utils/request'

// 查询组合信息
export function getTradeProfitList(query) {
  return request({
    url: '/pricing/group/getVGroupList.action',
    method: 'get',
    params: query
  })
}
// 新增组合信息
export function addTradeProfit(data) {
  return request({
    url: '/pricing/group/addVGroup.action',
    method: 'post',
    params: data
  })
}

// 修改组合信息
export function uptTradeProfit(data) {
  return request({
    url: '/pricing/group/updateVGroup.action',
    method: 'put',
    params: data
  })
}

// 删除组合信息
export function delTradeProfit(data) {
  return request({
    url: '/pricing/group/deleteVGroup.action',
    method: 'put',
    params: data
  })
}
  // 获取组合相关的交易
  export function getGroupBalance(data) {
    return request({
      url: '/pricing/trade/queryGroupBalanceByPage.action',
      method: 'get',
      params: data
    })
  }
    // 加入组合中
    export function insertToGroup(data) {
      return request({
        url: '/pricing/group/upGroupBalance.action',
        method: 'get',
        params: data
      })
    }
      // 从组合中移除
      export function removeToGroup(data) {
        return request({
          url: '/pricing/group/downGroupBalance.action',
          method: 'get',
          params: data
        })
  }


